<%@ page language="java" contentType="text/html;charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<title><s:text name="sys.app_title" />
		</title>
		<%@include file="../include/contentheader.jsp"%>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
		<link rel="stylesheet" type="text/css" href="css/main.css" />
		<script type="text/javascript">
			function getStaname(){
				window.returnValue=$('#staname').val();
				window.close();
			}
			function doClose(){
				window.close();
			}
			function check(selectedTr){ 
				if(selectedTr!=null){   
				var str=selectedTr.cells[0].innerText;
				$('#staname').val(str);
				}  
			}
		</script>
	</head>

	<body>
	<center>
			<div style="width: 300px;height: 350px;padding: 0px;overflow: auto;">
			  <form>
			  <table class="gridTable" border="0" cellspacing="0" cellpadding="0" style="margin:0px;">
					<tr>
						<td class="gridData">
						<table class="dataTable" border="0" cellpadding="0" cellspacing="1">
	     				     <tr class="dataHeader">
	          	<!-- 数据表头 -->
	    			           <td width="50%">员工姓名</td>
	    			           <td width="40%">选择</td>
	    		           </tr>
	    		<!-- 循环数据 -->   
	    		           <s:iterator value="setStaffs" var="l">
	    		           <tr class="dataRow" onclick="check(this)">
	    		             <td width="50%">
	    		                <s:property value="#l.staname"/>
	    		             </td>
	    		             <td width="40%">
	    		               <input type="button" value="选择" />
	    		             </td>
	    		           </tr>
	    		           </s:iterator>
	    		           <input type="hidden" id="staname" />
	    		  </table>
	    		  </td>
	    		  </tr>
	    		  </table>
	    		  
	    	</form>	  
		</div>
		<div style="width: 300px;height: 200px;padding: 0px;">
		    <input type="button" onclick="getStaname()" value="确定" />
		    <input type="button" onclick="doClose();" value="取消" />
		</div>  
		</center>
	</body>
</html>